﻿using System.Collections.Generic;
using Windows.UI.Xaml;
using com.IronOne.BoardPACWinAppBO.General;

namespace com.IronOne.BoardPACWinAppBO.Settings
{
    public class AppSettingModel : ResponseDataModel
    {
        public string ServerUrl { get; set; }
        public List<CustomKeyValuePair<string, string>> DateFormats { get; set; }
        public CustomKeyValuePair<string, string> DateFormatSelected { get; set; }
        public List<CustomKeyValuePair<string, string>> SyncFrequencies { get; set; }
        public CustomKeyValuePair<string, string> SyncFrequencySelected { get; set; }

        /// <summary>
        ///     Value in seconds
        /// </summary>
        public int SyncFrequencyServerDecides { get; set; }

        public bool SyncSettings { get; set; }
        //public int AppOfflineUsageCheck { get; set; }
        //public int EnforceOnlineLoginDuration { get; set; }
        //public int OfflineConsecutiveLimit { get; set; }
        //public int MaxOfflineLoginInterval { get; set; }


        public bool ShowSupportInfo { get; set; }
        public Visibility ShowSupportInfoUi { get; set; }
        public string SupportInfoName { get; set; }
        public string[] SupportInfoEmails { get; set; }
        public string[] SupportInfoPhones { get; set; }
        public string SupportInfoDisplayEmails { get; set; }
        public string SupportInfoDisplayPhones { get; set; }
        public string DownloadUrl { get; set; }
        public string ServerMessage { get; set; }
        public string ServerCommands { get; set; }
        public string SyncFrequencyServerDecidesDisplay { get; set; }

        /// <summary>
        ///     var ver = Package.Current.Id.Version;
        ///     asm.AppVersion = ver.Major + "." + ver.Minor + "." + ver.Build;
        /// </summary>
        public string AppVersion { get; set; }

        public string MinWebVersion { get; set; }
        public string CurrentWebVersion { get; set; }

        public string DateFormatServerDecidesDisplay { get; set; }
    }


    public class CustomKeyValuePair<TKey, TValue>
    {
        public TKey Key { get; set; }
        public TValue Value { get; set; }
    }
}